# Copyright Google Inc. All Rights Reserved.
#
# Use of this source code is governed by an MIT-style license that can be
# found in the LICENSE file at https://angular.dev/license

load("//tools:defaults.bzl", "npm_package", "ts_project")

licenses(["notice"])

RUNTIME_ASSETS = [
    "package.json",
]

ts_project(
    name = "create",
    srcs = glob([
        "src/*.ts",
    ]),
    data = RUNTIME_ASSETS,
    deps = [
        "//:node_modules/@types/node",
        "//packages/angular/cli:angular-cli",
    ],
)

genrule(
    name = "license",
    srcs = ["//:LICENSE"],
    outs = ["LICENSE"],
    cmd = "cp $(execpath //:LICENSE) $@",
)

npm_package(
    name = "pkg",
    pkg_deps = [
        "//packages/angular/cli:package.json",
    ],
    tags = ["release-package"],
    visibility = ["//visibility:public"],
    deps = RUNTIME_ASSETS + [
        ":README.md",
        ":create",
        ":license",
    ],
)
